import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: '首页',
    component: () => import('../views/Must.vue'),
    meta:{
      isturn:false
    }
  },
  {
    path: '/home',
    name: '首页',
    component: () => import('../views/Home.vue'),
    meta:{
      isturn:true
    }
  },
  
  {
    path: '/Sort',
    name: '分类',
    component: () => import('../views/Sort.vue'),
    meta:{
      isturn:true
    }
  },
  {
    path: '/Shopping',
    name: '购物车',
    component: () => import('../views/Shopping.vue'),
    meta:{
      isturn:true,
    }
  },
  {
    path: '/Mine',
    name: '我的',
    component: () => import('../views/Mine.vue'),
    meta:{
      isturn:true,
      keepAlive: false,
    }
  },
  {
    path: '/Login',
    name: '登录',
    component: () => import('../views/Login.vue'),
    meta:{
      isturn:false,
    }
    
  },
  {
    path: '/Xiangqing',
    name: '详情',
    component: () => import('../views/Xiangqing.vue'),
    meta:{
      isturn:false,
    }
  },
  {
    path: '/Order',
    name: '确认订单',
    component: () => import('../views/Order.vue'),
    meta:{
      isturn:false,
    }
  },
  {
    path: '/Address',
    name: '收货地址',
    component: () => import('../views/Address.vue'),
    meta:{
      isturn:false,
    }
  },{
    path: '/Person',
    name: '个人信息',
    component: () => import('../views/Person.vue'),
    meta:{
      isturn:false,
    }
  }
]

const router = new VueRouter({
  routes
})

export default router
